package com.sunlong.jiangwei.web;

import com.sunlong.jiangwei.entity.AsideMenuS;
import com.sunlong.jiangwei.entity.result.Result;
import com.sunlong.jiangwei.service.IAsideMenuS;
import com.sunlong.jiangwei.util.ResultUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/jiangwei/aside-menu-s")
@Slf4j
public class AsideMenuSController {
    @Autowired
    private IAsideMenuS asideMenu;
    @GetMapping("/findAll")
    public Result<List<AsideMenuS>> findAll(){
        List<AsideMenuS> asideMenus = asideMenu.selectMenuItemsAll();
        return ResultUtil.data(asideMenus);
    }
}
